package com.dehui.traders.ui.viewmodle;

import android.content.Context;
import android.databinding.ObservableArrayList;
import android.databinding.ObservableField;
import android.databinding.ObservableList;
import android.widget.ListView;
import android.widget.TextView;

import com.dehui.traders.R;
import com.dehui.traders.adapter.PlateListAdapter;
import com.dehui.traders.bean.PlateBean;
import com.dehui.traders.utils.SimulatedDataManager;
import com.dehui.traders.widgets.BaseViewHolder;
import com.dehui.traders.widgets.CommonAdapter;

import java.util.ArrayList;
import java.util.List;

import me.goldze.mvvmhabit.base.BaseViewModel;

/**
 * Created by hqq on 18.4.2.
 */

public class PlateViewModel extends BaseViewModel{

    private ObservableList<PlateBean> observableList = new ObservableArrayList<>();
    private PlateListAdapter adapter = new PlateListAdapter(context,observableList,R.layout.list_item_plate_market);
    public ObservableField<CommonAdapter<PlateBean>> plateAdapterObservableField = new ObservableField(adapter);

    public PlateViewModel(Context context) {
        super(context);
        ArrayList<PlateBean> list = SimulatedDataManager.getPlateBean();
        observableList.addAll(list);

    }



}
